﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Abp.AspNetCore.Configuration;
using Abp.Modules;
using Abp.Reflection.Extensions;

namespace GCT.Foundation.Startup
{
    [DependsOn(
        typeof(FoundationTemplateWebCoreModule)
    )]
    public class FoundationTemplateWebHostModule : AbpModule
    {
        public override void PreInitialize()
        {
            //是否开启多租户
            Configuration.MultiTenancy.IsEnabled = true;

            // 使用MVC时间格式
            Configuration.Modules.AbpAspNetCore().UseMvcDateTimeFormatForAppServices = true;
        }

        public override void Initialize()
        {
            // 注册程序集中的依赖
            IocManager.RegisterAssemblyByConvention(this.GetType().GetAssembly());
        }
    }
}
